package me;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyHandler implements InvocationHandler {

	private Object target;
	
	public MyHandler(Object target){
		this.target = target;
	}
	
	@Override
	public Object invoke(Object proxy, Method method, Object[] args)
			throws Throwable {
		
		System.out.println("before");
		
		
		Object o =  method.invoke(target,args);
		
		System.out.println("end");
		
		return o;
	}

}
